package com.zho.dao;

import java.util.List;

import com.zho.common.domain.db.PagingInfo;
import com.zho.common.domain.db.SearchResult;
import com.zho.domain.bean.CgsCustomer;
import com.zho.domain.model.CustomerCondition;

public interface ICgsCustomerDAO {
	
	public void save(CgsCustomer transientInstance);

	public void delete(CgsCustomer persistentInstance);

	public CgsCustomer findById(java.lang.String id);

	public List findByExample(CgsCustomer instance);

	public List findByProperty(String propertyName, Object value);

	public List findByCustomerName(Object customerName);

	public List findByPhoneNumber(Object phoneNumber);

	public CgsCustomer findByEmailAddress(Object emailAddress);

	public List findByCountryOfResidence(Object countryOfResidence);

	public List findByAddress(Object address);

	public List findByTownCity(Object townCity);

	public List findByCountry(Object country);

	public List findByPostcode(Object postcode);

	public List findByLoginId(Object loginId);		
	
	public List findByPassword(Object password);

	public List findBySecurityQuestion(Object securityQuestion);

	public List findByAnswer(Object answer);

	public List findByPromotionCode(Object promotionCode);

	public List findByActiveFlg(Object activeFlg);

	public List findAll();
	
	public CgsCustomer merge(CgsCustomer detachedInstance);
	
	public void attachDirty(CgsCustomer instance);

	public void attachClean(CgsCustomer instance);
	
	public SearchResult<CgsCustomer> listCgsCustomer(CustomerCondition customerCondition, PagingInfo pagingInfo, final String orderColumn);
	
	public void updateProfilePicture(CgsCustomer cgsCustomer) throws Exception;
	
	public void updatePassword(CgsCustomer cgsCustomer) throws Exception;
}